'''
* This is the projet for Brtc LlmOps Platform
* @Author Leon-liao <liaosiliang@alltman.com>
* @Description //TODO 
* @File: document_task.py
* @Time: 2025/11/13
* @All Rights Reserve By Brtc
'''
from uuid import UUID
from celery import shared_task

@shared_task
def build_documents(document_ids: list[UUID])-> None:
    """根据传递的文档id 列表 ，构建文档 """
    from app.http.module import app_injector
    from internal.service import IndexingService
    indexing_service = app_injector.get(IndexingService)
    indexing_service.build_documents(document_ids)


@shared_task
def update_document_enabled(document_id:UUID)-> None:
    """根据传递的文档id 修改文档的状态"""
    from app.http.module import app_injector
    from internal.service import IndexingService
    indexing_service = app_injector.get(IndexingService)
    indexing_service.update_document_enabled(document_id)